package com.atguigu.gulimall.product.service;

import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.product.entity.CategoryEntity;
import com.atguigu.gulimall.product.vo.Catelog2VO;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * 商品三级分类
 *
 * @author wenchao.long
 * @email wenchao.long@gmail.com
 * @date 2021-06-12 22:51:26
 */
public interface CategoryService extends IService<CategoryEntity> {

    /**
     * 分页查询
     *
     * @param params params
     * @return PageUtils
     */
    PageUtils queryPage(Map<String, Object> params);

    /**
     * 树形结构的树
     *
     * @return CategoryEntity List
     */
    List<CategoryEntity> listWithTree();

    void removeMenuByIds(List<Long> ids);

    /**
     * 找到catelogId的完整路径
     * [父/子/孙]
     *
     * @param catelogId catelogId
     * @return Long[]
     */
    Long[] findCatelogPath(Long catelogId);

    void updateDetail(CategoryEntity category);

    List<CategoryEntity> getLevel1Catagories();

    Map<String, List<Catelog2VO>> getCatalogJson();
}

